package org.getOffer.offer11;

/**
 * @Author: wjy
 * @Date: 2021/9/26 11:00
 */
public class Solution {

    public static void main(String[] args) {

        int[] arrays = {3,4,5,1,2};

        System.out.println(minArray(arrays));

    }

    public static int minArray(int[] numbers) {

        if (numbers.length == 0) {
            return 0;
        }

        int min = numbers[0];

        for (int i : numbers) {
            if (min > i) {
                min = i;
            }
        }

        return min;

    }

}
